home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
BASIC
/
0156.ZIP
/
RGRAPH.UNP
< prev
next >
Wrap
Text File
|
1984-10-24
|
12KB
|
363 lines
FOR THE USERS THAT HAVE 'R:GRAPH' V 1.0
-------------------------------------------------------------------
THIS IS DATED SEPT 1, 1984 AND SUPERSEDES ALL UNDATED
VERSIONS OR DATED VERSIONS PRIOR TO THIS DATE.
FROM : THE A.S.P ; (Against Software Protection)
ORIGINALLY SUBMITTED TO ASA FULTON'S BBS (SHINING SUN - 305-273-0020)
AND TO WHIT WYANT'S BBS (PC-CONNECT - 203-966-8869)
PLEASE NOTE THAT THESE UNPROTECT PROCEDURES INVOLVE FROM 4 HOURS TO
___________________________________________________________________
40 OR MORE HOURS ( 20+ HOURS FOR 'R:GRAPH) OF
SINGLE STEPPING THRU CODE AND FIGURING OUT THE
INTENT OF THE ORIGINAL CODE.. SO I WOULD APPRECIATE IT WHEN U PASS
THIS ON TO OTHER BOARDS YOU DO NOT ALTER THIS OR TRY TO TAKE CREDIT
FOR MY LOST SLEEP.... THE A.S.P... ORLANDO FLA. (J.P. TO HIS FRIENDS)
IF YOU HAVE A HARD DISK OR WANT TO CREATE A BACKUP COPY THAT IS NOT
TIED INTO THE 'R:GRAPH' DISKETTE...IN CASE YOUR ONLY COPY GOES BAD
.. THIS PATCH WILL REMOVE THE COPY PROTECTION COMPLETELY....
AS ALWAYS THIS IS FOR YOUR PERSONAL PEACE OF MIND ONLY
IT IS NOT MEANT TO BYPASS ANY COPYRIGHTS..YOU ARE BY LAW BOUND BY
YOUR PURCHASE LICENSE AGREEMENT.
IF YOU HAVE A HARD DISK AND WANT TO PUT THE PROGRAM ON SUCH
WHY SHOULD YOU BE TIED TO A FLOPPY. YOU HAD TO GIVE UP A LOT OF
'BIG MACS' TO GET YOUR HARD DISK.
1). FORMAT 1 SYSTEM DISK UNDER DOS 2.0 OR 2.1
2). LABEL IT ACCORDING TO THE ORIGINAL 'R:GRAPH' PROGRAM DISKETTE
3). COPY THE FILES FROM THE ORIGINAL DISKETTE TO THE CORRESPONDING
2.X FORMATTED DISKETTE
4). PLACE THE ORIGINAL 'R:GRAPH' DISKETTE BACK IN THE MANUAL
WE WILL NO LONGER USE THEM.
5). I WON'T TELL U HOW TO USE DEBUG OR ANY 'PATCHER' PROGRAMS
ON THE BBS'S.
6). FIRST WE WILL NEED TO CHANGE A PROGRAM CALLED 'RGRAPG2.EXE'
7). THE FOLLOWING IS THE OUTPUT WHEN THE ORIGINAL 'RGRAPH2.EXE'
WAS COMPARED WITH THE MODIFIED VERSION, USING DOS 'COMP'.
Compare error at offset 279
File 1 = A1
File 2 = C3
Compare error at offset 112BF
File 1 = 41
File 2 = 52
Compare error at offset 112C0
File 1 = 3A
File 2 = 47
Compare error at offset 112C1
File 1 = 52
File 2 = 30
Compare error at offset 112C2
File 1 = 47
File 2 = 20
Compare error at offset 112C3
File 1 = 30
File 2 = 20
Compare error at offset 112CA
File 1 = 41
File 2 = 52
Compare error at offset 112CB
File 1 = 3A
File 2 = 47
Compare error at offset 112CC
File 1 = 52
File 2 = 30
Compare error at offset 112CD
File 1 = 47
File 2 = 2E
Compare error at offset 112CE
File 1 = 30
File 2 = 45
Compare error at offset 112CF
File 1 = 2E
File 2 = 58
Compare error at offset 112D1
File 1 = 58
File 2 = 00
Compare error at offset 112D2
File 1 = 45
File 2 = 00
Compare error at offset 112F1
File 1 = 41
File 2 = 20
NOTE: NOW ALL OF 'R:GRAPH' COPY PROTECTION IS REMOVED, AND U MAY DISKCOPY
THE UNPROTECTED DISKS AS REQUIRED.
OTHER NOTES:
-------------------------------------------------------------------------
1). CHECKS FOR SPECIALLY FORMATTED TRACKS COMPLETELY REMOVED
2). U MAY LOAD ALL THE FILES ON THE NEWLY FORMATTED AND UNPROTECTED
DISKETTE DIRECTLY TO HARD OR RAM DISK, IN ANY SUB-DIRECTORY U
SET UP
3). DISK NO LONGER REQUIRED TO BE IN DRIVE "A" AT START UP
4). NO 'ASSIGNS' NECESSARY, ALL FILES MODIFIED TO USE CURRENT DEFAULT DRIVE
5). DO NOT!!! , I REPEAT , DO NOT !!! EXECUTE 'RGRAPH.COM' AS INSTRUCTED
IN THE MANUALS. INSTEAD EXECUTE 'RGRAPH2.EXE'. YOU MAY SET UP A BATCH FILE
CALLED 'RGRAPH.BAT' IF U REALLY WANT TO EMULATE THE INTRUCTIONS, OTHERWISE
EXECUTE 'RGRAPH2.EXE' DIRECTLY (WHICH IS WHAT RGRAPH.COM DOES INDIRECTLY).
6). WHAT FOLLOWS IS THE DISASSEMBLY OF RGRAPH.COM FOR U ASSEMBLER PROGRAMMERS
TO SEE WHAT WAS HAPPENING, WITH MY COMMENTS, ANOTHER EXTRA FOR YOU.
TITLE RGRAPH 5-25-84 [8-20-84]
RET_FAR MACRO
DB 0CBH
ENDM
;
RET_NEAR MACRO
DB 0C3H
ENDM
;
.RADIX 16
LF EQU 0AH
CR EQU 0DH
;
;INITIAL VALUES : CS:IP 0000:0100
; SS:SP 0000:FFFF
S0000 SEGMENT
ASSUME DS:S0000, SS:S0000 ,CS:S0000 ,ES:S0000
ORG $+0100H
L0100: LEA SP,L02CA ;LOAD ADDRESS OF TOP OF OUR STACK
MOV AX,CS
MOV SS,AX ;POINT THE STACK SEGMENT TO OUR CODE SEGMENT
PUSH DS ;SET UP RETURN TO BEGINNING OF PSP FOR INT 20
XOR BX,BX ;PUSH OUR DATA SEGMENT AND A WORD OF ZEROS ON STACK
PUSH BX
XOR AL,AL ;CHECK PSP X'80' (LENGTH BYTE) TO SEE IF ANY
CMP ES:80,AL ;PARAMETERS ENTERED WHEN WE EXECUTED PROGRAM
JZ L012E ;NO, LENGTH WAS ZERO
XOR CX,CX ;YES, LETS SAVE THE INPUT PARAMETER STRING
MOV CL,ES:80 ; GET THE LENGTH OF THE PARAMETER STRING
MOV DI,OFFSET L0142 ;POINT TO OUR SAVE STRING AREA
MOV SI,82 ;POINT TO FIRST PARAMETER BYTE IN PSP
REPZ MOVSB ;SAVE IT
MOV AL,ES:80 ;GET PARAMETER LENGTH AGAIN
ADD AL,7 ;ACCOUNT FOR "RGRAPH2" ALREADY IN STRING
MOV CS:L0139,AL ;SAVE PARAMETER LENGTH IN FRONT OF STRING
L012E: CALL L02CB ;SETUP SCREEN AND REPLACE INT 21
RET_FAR
L0132 DW 0 ;SAVE TRUE INT 21 SEGMENT OFFSET
L0134 DW 0 ;SAVE TRUE INT 21 SEGMENT ADDRESS
L0136 DW 0 ;SAVE OUR CODE SEGMENT ADDRESS
L0138 DB 1 ;GENERAL PURPOSE PROGRAM PATH FLOW FLAG
L0139 DB 8 ;LENGTH OF STRING THAT FOLLOWS
DB "RGRAPH2 "
L0142 DB 0DH ;CARRIAGE RETURN FOR INT 21 X'A' FUNCTION CALL
DB 50 DUP(20) ;EXTENDED STRING AREA IF ANY PARAMETERS INPUT
;
; ENTRY POINT FOR OUR DOS 21 INTERRUPT HANDLER
;
L0193: CMP AH,0FF ;FUNCTION CALL X'FF'
JZ L01D4 ;YES
CMP AH,0FE ;FUNCTION CALL X'FE'
JZ L0203 ;YES, GO RESTORE TRUE INT 21 ADDRESS
CMP BYTE PTR CS:L0138,1 ;IS FLAG SET TO 1
JNZ L01AA ;NO
CMP AH,0A ;YES, IS IT A BUFFERED KEYBOARD FUNCTION CALL
JZ L01AF ;YES, GO GIVE CALLER WHAT WE WANT HIM TO SEE
L01AA: JMP DWORD PTR CS:L0132 ;LETS GO LET THE REAL DOS 21 HANDLER DO IT
;
; ENTRY POINT FOR DOS 21 X'0A' FUNCTION CALL (BUFFERED KEYBOARD INPUT)
;
L01AF: PUSH DS ;SAVE SOME REGISTERS
PUSH CX
PUSH ES
PUSH DI
PUSH SI
PUSH DS ;POINT 'ES' TO CALLERS DATA SEGMENT
POP ES
MOV DI,DX ;DS:DX POINTS TO CALLERS INPUT BUFFER '
INC DI ;POINT 1 BYTE PAST CALLERS INPUT BUFFER LENGTH
PUSH CS ;POINT DATA SEGMENT TO USE
POP DS
MOV SI,OFFSET L0139 ;POINT TO OUR STRING WE WANT TO SEND CALLER
XOR CX,CX
MOV CL,[SI] ;GET THE LENGTH OF OUR STRING
INC CL
INC CL ;INCREMENT STRING LENGTH BY 2 TO ALLOW FOR 'CR'
REPZ MOVSB ;PASS STRING TO CALLERS INPUT BUFFER
MOV BYTE PTR CS:L0138,0 ;SET FLAG TO '0'
POP SI ;RESTORE SAVED REGISTERS
POP DI
POP ES
POP CX
POP DS
IRET ;RETURN TO CALLER
;
; ENTRY POINT FOR INT 21 X'FF' FUNCTION CALL
;
L01D4: PUSH CX ;SAVE SOME REGISTERS
PUSH DI
PUSH SI
MOV BYTE PTR CS:L0138,1 ;SET FLAG TO '1'
MOV DI,OFFSET L0139 ;POINT TO OUR STRING (LENGTH BYTE)
INC DI ;POINT PAST LENGTH BYTE TO STRING BYTE
;
MOV SI,DX ;POINT TO OUR CODE WHERE CALLER WANTS ***************
;
XOR CX,CX
L01E5: MOV AH,[SI] ;GET A BYTE OF OUR PROGRAM CODE
CMP AH,0 ;WAS THE BYTE A '0'
JZ L01F4 ;YES, WE ARE THRU
MOV CS:[DI],AH ;NO, SAVE THE REQUESTED BYTE IN OUR STRING
INC CX ;SET POINTS UP BY 1
INC SI
INC DI
JMP SHORT L01E5 ;GO GET NEXT REQUESTED BYTE
L01F4: MOV AH,0DH ;MOVE A CARRAIGE RETURN AS LAST BYTE OF STRING
MOV CS:[DI],AH
MOV DI,OFFSET L0139 ;REPLACE THE STRING LENGTH WITH A
MOV CS:[DI],CL ;NEW STRING LENGTH
POP SI ;RESTORE THE SAVED REGISTERS
POP DI
POP CX
IRET ;RETURN TO CALLER
;
; ENTRY POINT FOR INT 21 X'FE' FUNCTION CALL
;
L0203: CLI
XOR AX,AX ;POINT TO INT 21 VECTOR ADDRESS
MOV ES,AX
MOV BX,84
MOV CX,CS:L0132 ;RESTORE INT 21 SEGMENT OFFSET
MOV ES:[BX],CX
MOV DX,CS:L0134 ;RESTORE INT 21 SEGMENT ADDRESS
MOV ES:[BX+2],DX
STI
MOV ES,CS:L0136 ;PUT SEGMENT OF BLOCK (OUR CS) IN 'ES'
MOV BX,0 ;SET NEW REQUESTED BLOCK SIZE IN PARAGRAPHS
MOV AH,4A ;REQUEST MODIFY OF ALLOCATED MEMORY BLOCKS
INT 21
IRET ;RETURN TO CALLER
;
; OUR INTERNAL STACK AREA
;
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
DB 'STACK '
L02CA DB 0 ;TOP OF STACK + 1
;
; INITIAL PROGRAM ENTRY POINT TO OVERIDE INT 21 FUNCTION CALL
;
L02CB: XOR DX,DX ;SET CURSOR TO ROW=0,COLUMN=0 (UPPER LEFT)
MOV BH,0
MOV AH,2 ;SET CURSOR FUNCTION CALL TO ROM
INT 10
XOR AX,AX
MOV ES,AX ;POINT TO EQUIPMENT FLAGS
MOV DL,410
AND DL,30 ;ISOLATE TYPE OF MONITOR
CMP DL,30 ;IS MONOCHROME INSTALLED
JZ L02EC ;YES, GO DISABLE VIDEO INPUT
;
MOV DX,03D8 ;NO, POINT TO COLOR MODE CONTROL REGISTER
MOV AL,1 ;TURN OFF VIDEO ENABLE
OUT DX,AL
JMP SHORT L02F2
L02EC: MOV AL,1 ;TURN OFF MONOCHROME VIDEO ENABLE
MOV DX,03B8
OUT DX,AL
;
L02F2: CLI
MOV CS:L0136,CS ;SAVE OUR CODE SEGMENT
XOR AX,AX
MOV ES,AX
MOV BX,84 ;POINT TO 0:84 , INT 21 VECTOR ADDRESS
MOV CX,ES:[BX] ;GET AND SAVE DOS INT 21 SEGMENT OFFSET ADDRESS
MOV CS:L0132,CX
MOV DX,ES:[BX+2] ;GET AND SAVE DOS INT 21 SEGMENT ADDRESS
MOV CS:L0134,DX
MOV CX,OFFSET L0193 ;POINT TO OUR SEGMENT OFFSET REPLACEMENT ADDR
MOV ES:[BX],CX ;REPLACE INT 21 SEGMENT OFFSET WITH OURS
MOV DX,CS
MOV ES:[BX+2],DX ;REPLACE INT 21 SEGMENT ADDRESS WITH OURS
STI
MOV DX,OFFSET L02CB ;POINT TO END OF CODE+1 TO REMAIN RESIDENT
INC DX
PUSH CS
POP ES
INT 27 ;TERMINATE AND REMAIN RESIDENT
RET_NEAR
END L0100
ENJOY YOUR NEW FOUND FREEDOM..HARD DISKS FOREVER!!!!!